//
//  UIUtils.h
//  p2p
//
//  Created by mokai on 14-8-13.
//  Copyright (c) 2014年 cloudyoo. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@interface UIUtils : NSObject

/**
 *  得到当前UINavigationController上的topViewController
 *  @return
 */
+(UIViewController *)currentViewController;
/**
 *  得到当前UINavigationController中的指定类实例
 *  @return
 */
+(UIViewController *)currentViewWithClass:(Class)clazz;
/**
 *  pop至指定的Viewcontroller
 *
 *  @param clazz
 */
+(void)popToViewContorllerWithClass:(Class)clazz;
/**
 *  向外pop几级
 *
 *  @param count
 */
+(void)popToViewContorllerWithCount:(int)count;
/**
 *  push ViewController
 *
 *  @param ctr
 */
+(void)pushViewController:(UIViewController *)ctr;
/**
 *  自动切换焦点到当前textfield tag的下一个
 *
 *  @param field
 */
+(void)nextBecomeFirstResponderWithCurrentTextField:(UITextField *)field;
+(void)nextBecomeFirstResponderWithCurrentTextField:(UITextField *)current nextTextField:(UITextField *)next;


@end
